package com.leyou.gateway.web;

import org.springframework.http.HttpStatus;
import org.springframework.http.ResponseEntity;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RestController;

@SuppressWarnings("ALL")
/**
 * @Description :
 * @author     :LD
 */
@RestController
public class FallbackController {
    @GetMapping("/hystrix/fallback")
    public ResponseEntity<String> handleFallback(){
        //响应对象的封装，有状态码和返回消息内容
        return ResponseEntity.status(HttpStatus.GATEWAY_TIMEOUT).body("服务器请求超时");
    }
}
